home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / mimelib / config.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-05-14  |  5.4 KB  |  171 lines

  1. //=============================================================================
  2. // File:       config.h
  3. // Contents:   Declarations of macros for configuring the library
  4. // Maintainer: Doug Sauder <dwsauder@fwb.gulf.net>
  5. // WWW:        http://www.fwb.gulf.net/~dwsauder/mimepp.html
  6. //
  7. // Copyright (c) 1996, 1997 Douglas W. Sauder
  8. // All rights reserved.
  9. // 
  10. // IN NO EVENT SHALL DOUGLAS W. SAUDER BE LIABLE TO ANY PARTY FOR DIRECT,
  11. // INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF
  12. // THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF DOUGLAS W. SAUDER
  13. // HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. //
  15. // DOUGLAS W. SAUDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT
  16. // NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  17. // PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
  18. // BASIS, AND DOUGLAS W. SAUDER HAS NO OBLIGATION TO PROVIDE MAINTENANCE,
  19. // SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. //
  21. //=============================================================================
  22.  
  23. #ifndef DW_CONFIG_H
  24. #define DW_CONFIG_H
  25.  
  26. //-----------------------------------------------------------------------------
  27. // Platform
  28. //
  29. // Make sure that the following lines define either DW_UNIX or DW_WIN32.
  30. //-----------------------------------------------------------------------------
  31.  
  32. #if defined(_WIN32) || defined(__WIN32__)
  33. #   define DW_WIN32
  34. #endif
  35.  
  36. #if defined(__unix__) || defined(__unix) || defined(_AIX) || defined(__NetBSD__) || defined(__APPLE__)
  37. #   define DW_UNIX
  38. #endif
  39.  
  40. //-----------------------------------------------------------------------------
  41. // End of line characters
  42. //
  43. // Uncomment one of the following to indicate whether you want the library to
  44. // use LF or CR LF as the end of line characters.
  45. //
  46. // I strongly recommend using LF ('\n') alone as the end of line character,
  47. // since that is the normal end of line character for C and C++ libraries.
  48. // Then you can do the conversion to and from the CR LF end of line
  49. // characters at the interface to the transport system.
  50. //-----------------------------------------------------------------------------
  51.  
  52. #define DW_EOL_LF
  53. //#define DW_EOL_CRLF
  54.  
  55. #if defined(DW_EOL_CRLF)
  56. #   define DW_EOL  "\r\n"
  57. #elif defined(DW_EOL_LF)
  58. #   define DW_EOL  "\n"
  59. #else
  60. #   error "Must define DW_EOL_CRLF, DW_EOL_LF"
  61. #endif
  62.  
  63. //-----------------------------------------------------------------------------
  64. // C++ namespaces
  65. //
  66. // Uncomment the following line if you want the DwMime namespace to be defined.
  67. // If the namespace is not defined, then enums are specified as part of a
  68. // DwMime class.
  69. //-----------------------------------------------------------------------------
  70.  
  71. //#define DW_USE_NAMESPACES
  72.  
  73.  
  74. //-----------------------------------------------------------------------------
  75. // C++ library string class
  76. //
  77. // Uncomment the following line if you want DwString typedef-ed to the
  78. // ANSI/ISO string class.
  79. //
  80. // *** Important: This option is not working or not fully tested yet ***
  81. //-----------------------------------------------------------------------------
  82.  
  83. //#define DW_USE_ANSI_STRING
  84.  
  85.  
  86. //-----------------------------------------------------------------------------
  87. // bool type
  88. //
  89. // Uncomment the following line if you want DwBool typedef-ed to int instead
  90. // of bool.
  91. //-----------------------------------------------------------------------------
  92.  
  93. //#define DW_NO_BOOL
  94.  
  95. #if defined(DW_NO_BOOL)
  96.  
  97. typedef int            DwBool;
  98. #define DwFalse  0
  99. #define DwTrue   1
  100.  
  101. #else
  102.  
  103. typedef bool           DwBool;
  104. #define DwFalse  false
  105. #define DwTrue   true
  106.  
  107. #endif
  108.  
  109.  
  110. //-----------------------------------------------------------------------------
  111. // DLL vs static library
  112. //
  113. // Win32 users: Uncomment out the following line to create a static library
  114. // instead of a DLL.
  115. //-----------------------------------------------------------------------------
  116.  
  117. // #define DW_NO_DLL
  118.  
  119. #if defined(DW_WIN32) && !defined(DW_NO_DLL)
  120. #   ifdef DW_IMPLEMENTATION
  121. #      define DW_EXPORT __declspec(dllexport)
  122. #   else
  123. #      define DW_EXPORT __declspec(dllimport)
  124. #   endif
  125. #else
  126. #   include <kdepimmacros.h>
  127. #   define DW_EXPORT KDE_EXPORT
  128. #endif
  129.  
  130. //-----------------------------------------------------------------------------
  131. // Type definitions
  132. //
  133. // Make sure the following types are accurate for your machine.
  134. //-----------------------------------------------------------------------------
  135.  
  136. #if defined(__BCPLUSPLUS__) && !defined(__WIN32__)
  137. #   define DW_STD_16_BIT
  138. #endif
  139.  
  140. #if defined(__alpha) || defined(__sgi)
  141. #   define DW_STD_64_BIT
  142. #endif
  143.  
  144. #if !defined(DW_STD_16_BIT) && !defined(DW_STD_64_BIT)
  145. #   define DW_STD_32_BIT
  146. #endif
  147.  
  148. typedef char           DwChar7;  // type for ASCII characters
  149. typedef unsigned char  DwChar8;  // type for 8-bit characters
  150. typedef signed char    DwInt8;   // type for 8-bit signed integers
  151. typedef unsigned char  DwUint8;  // type for 8-bit unsigned integers
  152.  
  153. #if defined(DW_STD_16_BIT)
  154. typedef int            DwInt16;  // 16-bit signed integers
  155. typedef unsigned int   DwUint16; // 16-bit unsigned integers
  156. typedef long           DwInt32;  // 32-bit signed integers
  157. typedef unsigned long  DwUint32; // 32-bit unsigned integers
  158. #elif defined(DW_STD_32_BIT)
  159. typedef short          DwInt16;
  160. typedef unsigned short DwUint16;
  161. typedef int            DwInt32;
  162. typedef unsigned int   DwUint32;
  163. #elif defined(DW_STD_64_BIT)
  164. typedef short          DwInt16;
  165. typedef unsigned short DwUint16;
  166. typedef int            DwInt32;
  167. typedef unsigned int   DwUint32;
  168. #endif
  169.  
  170. #endif
  171.